package com.org.model;

/**
 * ProductParameterValueId entity. @author MyEclipse Persistence Tools
 */

public class ProductParameterValueId implements java.io.Serializable {

	// Fields

	private Product product;
	private Parameter parameter;

	// Constructors

	/** default constructor */
	public ProductParameterValueId() {
	}

	/** full constructor */
	public ProductParameterValueId(Product product, Parameter parameter) {
		this.product = product;
		this.parameter = parameter;
	}

	// Property accessors

	public Product getProduct() {
		return this.product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public Parameter getParameter() {
		return this.parameter;
	}

	public void setParameter(Parameter parameter) {
		this.parameter = parameter;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ProductParameterValueId))
			return false;
		ProductParameterValueId castOther = (ProductParameterValueId) other;

		return ((this.getProduct() == castOther.getProduct()) || (this
				.getProduct() != null
				&& castOther.getProduct() != null && this.getProduct().equals(
				castOther.getProduct())))
				&& ((this.getParameter() == castOther.getParameter()) || (this
						.getParameter() != null
						&& castOther.getParameter() != null && this
						.getParameter().equals(castOther.getParameter())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getProduct() == null ? 0 : this.getProduct().hashCode());
		result = 37 * result
				+ (getParameter() == null ? 0 : this.getParameter().hashCode());
		return result;
	}

}